package designpattern.factorypattern;

/**
 * @author hubb
 * @Date 2019/3/28 23:44
 */
public class ExportPdfFactory extends ExportFactory {
    /**
     * @param type
     * @return
     */
    @Override
    public ExportFile factory(String type) {
        if ("standard".equals(type)) {

            return new ExportStandardPdfFile();

        }else if("financial".equals(type)){

            return new ExportFinancialPdfFile();

        }else{
            throw new RuntimeException("没有找到对象");
        }
    }

}
